import request from '/@/utils/request';
export async function postEvidence(params?: object) {
	return await request({
		url: '/evidence',
		method: 'post',
		data: params,
	});
}
export async function putEvidence(params?: object) {
	return await request({
		url: '/evidence',
		method: 'put',
		data: params,
	});
}
export async function save(params?: any) {
	if (!params.id) return await postEvidence(params);
	else return await putEvidence(params);
}
export async function deleteEvidence(params: any) {
	return await request({
		url: '/evidence',
		method: 'delete',
		data: params,
	});
}
export async function queryPagerCaseEvidences(params?: object) {
	return await request({
		url: '/evidence/pager',
		method: 'get',
		params,
	});
}
export async function queryPagerBoxCaseEvidences(params?: any) {
	return await request({
		url: `/evidence/box/pager`,
		method: 'get',
		params,
	});
}

export async function getEvidence(id) {
	return await request({
		url: `/evidence/${id}`,
		method: 'get',
	});
}
export async function GetyEvidenceTransferePager(params?: object) {
	return await request({
		url: `/evidence/transfere/pager`,
		method: 'get',
		params,
	});
}
//查询案件可借调物品
export async function GetCaseBorrowEvdences(params?: object) {
	return await request({
		url: '/evidence/borrow',
		method: 'get',
		params,
	});
}
//修改物品位置
export async function putEvidenceLocation(params?: object) {
	return await request({
		url: '/evidence/location',
		method: 'put',
		data: params,
	});
}
